import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# import networks as nx

# #使图表中的中文字符正常显示
# os.environ['NlS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
# plt.rcParams['font.sans_serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False

# #读取数据，含有关系1、关系2、权重三列
# data = pd.read_csv('')

# G = np.Graph()

# for i in range(data.shape[0]):
#     u,v,d = data.iloc[i,0],data.iloc[i,1],data.iloc[i,2]
#     G.add_weighted_edges_from([u,v,d])
    
# plt.figure(figsize=(16,16))
# nx.draw_networks(G,with_labels = False,node_size = 10,style = 'dashed')
# plt.savefig('关系网络.svg')
# plt.show()

# import numpy as np
# import pandas as pd
# import scipy.stats as stats

# data = pd.DataFrame(np.random.randn(2,2)*100, columns=['X','Y'])
# print('data\n',data)
# r,p = stats.pearsonr(data.X,data.Y)  # 相关系数和P值
# print('相关系数r为 = %6.3f，p值为 = %6.3f'%(r,p))